/*
 * Copyright (c) 2012 Keerthi Ramachandran .
 */
package com.kee.example.domain;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;

/**
 * This class... todo (RK) javadoc
 *
 * @author <a href="mailto:Keerthi.Ramachandran@navis.com">Keerthi Ramachandran</a>, 9/3/12
 * @since 2.4. /2012-09-03
 */
public class CustImage {
    private int id;
    private String imageName;
    private String imageDesc;
    private long sizeInBytes;

    public CustImage(int inId, String inImageName, String inImageDesc, long inSizeInBytes) {
        id = inId;
        imageName = inImageName;
        imageDesc = inImageDesc;
        sizeInBytes = inSizeInBytes;
    }

    public int getId() {
        return id;
    }

    public void setId(int inId) {
        id = inId;
    }

    public String getImageName() {
        return imageName;
    }

    public void setImageName(String inImageName) {
        imageName = inImageName;
    }

    public String getImageDesc() {
        return imageDesc;
    }

    public void setImageDesc(String inImageDesc) {
        imageDesc = inImageDesc;
    }

    public long getSizeInBytes() {
        return sizeInBytes;
    }

    public void setSizeInBytes(long inSizeInBytes) {
        sizeInBytes = inSizeInBytes;
    }

    @Override
    public int hashCode() {
        return new HashCodeBuilder().append(this.id).append(this.imageName).append(this.imageDesc).append(this.sizeInBytes).toHashCode();
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final CustImage other = (CustImage) obj;
        return new EqualsBuilder().append(this.id, other.id).append(this.imageName, other.imageName).append(this.imageDesc, other.imageDesc)
                .append(this.sizeInBytes, other.sizeInBytes).isEquals();
    }

    public CustImage() {
    }

    @Override
    public String toString() {
        return this.getId()+this.getImageName()+this.getImageDesc()+this.getSizeInBytes();
    }
}
